import {lazy} from "react"

const routes=[
    {
        from:"/",
        to:"/index/home"
    },
    {
        path:"/index",
        element:lazy(()=>import ("../page/Index")),
        children:[
            {
                path:"/index/home",
                element:lazy(()=>import ("../page/index/Home"))
            },
            {
                path:"/index/fenlei",
                element:lazy(()=>import ("../page/index/Fenlei"))
            },
            {
                path:"/index/huiyuan",
                element:lazy(()=>import ("../page/index/Huiyuan"))
            },
            {
                path:"/index/main",
                element:lazy(()=>import ("../page/index/Main"))
            },
            {
                path:"/index/shop",
                element:lazy(()=>import ("../page/index/Shop"))
            }
        ]
    },
    {
        path:"/detail",
        element:lazy(()=>import ("../page/Detail"))
    },
    {
        path:"*",
        element:lazy(()=>import ("../page/Eorry"))
    }
]

export default routes